# @Time    :2025/3/24 18:54
"""
4）有两个列表 list1 = [1, 2, 3, 4, 5] 和 list2 = [6, 7, 8, 9, 10]，
将它们合并为一个新列表 combined_list，并对 combined_list 进行降序排序
"""
# list1 = [1, 2, 3, 4, 5]
# list2 = [6, 7, 8, 9, 10]
# combined_list = []
# combined_list.extend(list1)
# combined_list.extend(list2)
# combined_list.sort(reverse=True)
# print(combined_list)

list1 = [1, 2, 3, 4, 5]
list2 = [6, 7, 8, 9, 10]
combined_list = []
combined_list = list2 + list1
combined_list.sort(reverse=True)
print(combined_list)


# combined_list = []
#         comblined_list=nums1+nums2
#         comblined_list.sort(reverse=False)
#         print(comblined_list)

class Solution:
    def merge(self, nums1, m, nums2, n):
        """
        Do not return anything, modify nums1 in-place instead.
        """
        nums1[m:] = nums2
        nums1.sort()
        return nums1


nums1 = [1, 2, 3, 0, 0, 0]
m = 3
nums2 = [2, 5, 6]
n = 3
s = Solution(nums1,m, nums2,n)
